home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
s-gikan2.maizuru-ct.ac.jp
/
s-gikan2.maizuru-ct.ac.jp.zip
/
s-gikan2.maizuru-ct.ac.jp
/
pub
/
ncvc352_install.exe
/
{app}
/
scripts
/
change_XZ_YX.pl
< prev
next >
Wrap
Perl Script
|
2004-04-02
|
467b
|
29 lines
#! /usr/bin/perl
# NCVCé┼ì∞ɼé╡é╜GâRü[âhé≡üANCÉ∙ö╒ùpé╔Ä▓ò╧è╖é╖éΘâXâNâèâvâg #
%XY= ("X","Z","Y","X","I","K","J","I");
$pre_file= $ARGV[0];
$out_file= $ARGV[1];
open(IN,$pre_file);
open(OUT,">$out_file");
while(<IN>){
if(!/^N?[0-9\s]*[\(\%]/){
if(/[XYIJ]/){
$new_line= "";
while(/([XYIJ])([0-9\-\.]+)/){
$new_line= $new_line.$`.$XY{$1}.$2;
$_= $';
}
$_= $new_line.$_;
}
}
print OUT;
}
close(OUT);
close(IN);